import Layout from '@/layout'

const routerRouter = [
  {
    path: '/dashboard',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/dashboard'),
        name: 'Dashboard',
        meta: {
          title: '工作台',
          icon: 'dashboard'
        }
      }
    ]
  },
  {
    path: '/artilce',
    component: Layout,
    meta: {
      title: '文章管理',
      icon: 'edit'
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/article/all'),
        name: 'PageManageAll',
        meta: {
          title: '所有文章',
          icon: 'edit'
        }
      },
      {
        path: 'category',
        component: () => import('@/views/views/article/category'),
        name: 'PageManageCategory',
        meta: {
          title: '分类管理',
          icon: 'table'
        }
      },
      {
        path: 'tag',
        component: () => import('@/views/views/article/tag'),
        name: 'PageManageTag',
        meta: {
          title: '标签管理',
          icon: 'table'
        }
      }
    ]
  },
  {
    path: '/page',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/pageManage'),
        name: 'PageManageIndex',
        meta: {
          title: '页面管理',
          icon: 'education'
        }
      }
    ]
  },
  {
    path: '/knowledge',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/knowledge'),
        name: 'Knowledge',
        meta: {
          title: '知识小册',
          icon: 'pdf'
        }
      }
    ]
  },
  {
    path: '/poster',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/posterManage'),
        name: 'posterManage',
        meta: {
          title: '海报管理',
          icon: 'star'
        }
      }
    ]
  },
  {
    path: '/comment',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/commentManage'),
        name: 'commentManage',
        meta: {
          title: '评论管理',
          icon: 'message'
        }
      }
    ]
  },
  {
    path: '/email',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/emailManage'),
        name: 'emailManage',
        meta: {
          title: '邮件管理',
          icon: 'email'
        }
      }
    ]
  },
  {
    path: '/file',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/fileManage'),
        name: 'fileManage',
        meta: {
          title: '文件管理',
          icon: 'table'
        }
      }
    ]
  },
  {
    path: '/search',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/searchManage'),
        name: 'searchManage',
        meta: {
          title: '搜索记录',
          icon: 'search'
        }
      }
    ]
  },
  {
    path: '/view',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/viewManage'),
        name: 'viewManage',
        meta: {
          title: '访问统计',
          icon: 'chart'
        }
      }
    ]
  },
  {
    path: '/user',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/userManage'),
        name: 'userManage',
        meta: {
          title: '用户管理',
          icon: 'user'
        }
      }
    ]
  },
  {
    path: '/setting',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/views/setting'),
        name: 'Setting',
        meta: {
          title: '系统设置',
          icon: 'example'
        }
      }
    ]
  },
  {
    path: '/artilce/editor',
    component: () => import('@/views/views/article/editor'),
    name: 'PageManage'
  }, {
    path: '/knowledge/editor/:id',
    component: () => import('@/views/views/knowledge/editor'),
    name: 'knowledgEeditor'
  },
  {
    path: "/artilce/editor/:id",
    component: () => import("@/views/views/article/detail"),
    name: "PageManage",
  },
];
export default routerRouter;
